/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.saga.lib.asyncserver;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author summers
 */
public class LoggingIllegalStateException extends IllegalStateException {

    public LoggingIllegalStateException(Exception ex) {
        super(ex);
        Logger.getLogger(ex.getStackTrace()[0].getClassName()).log(Level.SEVERE, null, ex);
    }

    public LoggingIllegalStateException(String message) {
        super(message);
        Logger.getLogger(this.getClass().getCanonicalName()).log(Level.SEVERE, message);
    }
    
}
